.class Les/q8;
.super Les/l8;
.source "TextDecorationTarget.java"


# annotations
.annotation system Ldalvik/annotation/Signature;
    value = {
        "Les/l8<",
        "Les/i8;",
        ">;"
    }
.end annotation


# direct methods
.method constructor <init>()V
    .locals 0

    .line 1
    invoke-direct {p0}, Les/l8;-><init>()V

    return-void
.end method

.method private static a(Les/g8;Lcom/esfile/screen/recorder/media/util/y;)Landroid/graphics/Bitmap;
    .locals 11
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Les/g8<",
            "Les/i8;",
            ">;",
            "Lcom/esfile/screen/recorder/media/util/y;",
            ")",
            "Landroid/graphics/Bitmap;"
        }
    .end annotation

    .line 3
    iget-object v0, p0, Les/g8;->g:Ljava/lang/Object;

    move-object v1, v0

    check-cast v1, Les/i8;

    iget-object v1, v1, Les/i8;->e:Ljava/lang/String;

    if-nez v1, :cond_0

    const/4 p0, 0x0

    return-object p0

    .line 4
    :cond_0
    check-cast v0, Les/i8;

    .line 5
    invoke-virtual {p1}, Lcom/esfile/screen/recorder/media/util/y;->b()I

    move-result v1

    .line 6
    invoke-virtual {p1}, Lcom/esfile/screen/recorder/media/util/y;->a()I

    move-result p1

    .line 7
    new-instance v4, Landroid/text/TextPaint;

    invoke-direct {v4}, Landroid/text/TextPaint;-><init>()V

    .line 8
    iget-boolean v2, v0, Les/i8;->a:Z

    if-eqz v2, :cond_1

    iget v2, v0, Les/i8;->b:F

    int-to-float v3, v1

    mul-float v2, v2, v3

    goto :goto_0

    :cond_1
    iget v2, v0, Les/i8;->b:F

    :goto_0
    invoke-virtual {v4, v2}, Landroid/text/TextPaint;->setTextSize(F)V

    .line 9
    iget v2, v0, Les/i8;->c:I

    invoke-virtual {v4, v2}, Landroid/text/TextPaint;->setColor(I)V

    const/4 v2, 0x1

    .line 10
    invoke-virtual {v4, v2}, Landroid/text/TextPaint;->setAntiAlias(Z)V

    .line 11
    iget-object v2, v0, Les/i8;->d:Landroid/graphics/Typeface;

    if-eqz v2, :cond_2

    .line 12
    invoke-virtual {v4, v2}, Landroid/text/TextPaint;->setTypeface(Landroid/graphics/Typeface;)Landroid/graphics/Typeface;

    .line 13
    :cond_2
    iget-boolean v2, v0, Les/i8;->f:Z

    if-eqz v2, :cond_3

    .line 14
    iget v2, v0, Les/i8;->g:F

    const/high16 v3, -0x1000000

    const/4 v5, 0x0

    invoke-virtual {v4, v2, v5, v5, v3}, Landroid/text/TextPaint;->setShadowLayer(FFFI)V

    .line 15
    :cond_3
    new-instance v10, Landroid/text/StaticLayout;

    iget-object v3, v0, Les/i8;->e:Ljava/lang/String;

    .line 16
    invoke-static {v3, v4}, Landroid/text/Layout;->getDesiredWidth(Ljava/lang/CharSequence;Landroid/text/TextPaint;)F

    move-result v0

    float-to-int v5, v0

    sget-object v6, Landroid/text/Layout$Alignment;->ALIGN_NORMAL:Landroid/text/Layout$Alignment;

    const/high16 v7, 0x3f800000    # 1.0f

    const/4 v8, 0x0

    const/4 v9, 0x1

    move-object v2, v10

    invoke-direct/range {v2 .. v9}, Landroid/text/StaticLayout;-><init>(Ljava/lang/CharSequence;Landroid/text/TextPaint;ILandroid/text/Layout$Alignment;FFZ)V

    .line 17
    iget-boolean v0, p0, Les/g8;->a:Z

    const/high16 v2, 0x3f800000    # 1.0f

    if-eqz v0, :cond_4

    invoke-virtual {v10}, Landroid/text/StaticLayout;->getWidth()I

    move-result v0

    int-to-float v0, v0

    mul-float v0, v0, v2

    int-to-float v1, v1

    div-float/2addr v0, v1

    goto :goto_1

    :cond_4
    invoke-virtual {v10}, Landroid/text/StaticLayout;->getWidth()I

    move-result v0

    int-to-float v0, v0

    :goto_1
    iput v0, p0, Les/g8;->b:F

    .line 18
    iget-boolean v0, p0, Les/g8;->a:Z

    if-eqz v0, :cond_5

    invoke-virtual {v10}, Landroid/text/StaticLayout;->getHeight()I

    move-result v0

    int-to-float v0, v0

    mul-float v0, v0, v2

    int-to-float p1, p1

    div-float/2addr v0, p1

    goto :goto_2

    :cond_5
    invoke-virtual {v10}, Landroid/text/StaticLayout;->getHeight()I

    move-result p1

    int-to-float v0, p1

    :goto_2
    iput v0, p0, Les/g8;->c:F

    .line 19
    invoke-virtual {v10}, Landroid/text/StaticLayout;->getWidth()I

    move-result p0

    invoke-virtual {v10}, Landroid/text/StaticLayout;->getHeight()I

    move-result p1

    sget-object v0, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config;

    invoke-static {p0, p1, v0}, Landroid/graphics/Bitmap;->createBitmap(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;

    move-result-object p0

    .line 20
    new-instance p1, Landroid/graphics/Canvas;

    invoke-direct {p1, p0}, Landroid/graphics/Canvas;-><init>(Landroid/graphics/Bitmap;)V

    invoke-virtual {v10, p1}, Landroid/text/StaticLayout;->draw(Landroid/graphics/Canvas;)V

    return-object p0
.end method


# virtual methods
.method a(ILcom/esfile/screen/recorder/media/util/y;)Z
    .locals 1

    .line 1
    iget-object v0, p0, Les/l8;->a:Les/g8;

    invoke-static {v0, p2}, Les/q8;->a(Les/g8;Lcom/esfile/screen/recorder/media/util/y;)Landroid/graphics/Bitmap;

    move-result-object p2

    const/4 v0, 0x1

    .line 2
    invoke-static {p1, p2, v0}, Lcom/esfile/screen/recorder/media/glutils/b;->a(ILandroid/graphics/Bitmap;Z)Z

    move-result p1

    return p1
.end method

.method public g()V
    .locals 0

    .line 1
    invoke-super {p0}, Les/l8;->g()V

    return-void
.end method
